{template 'web/common/common'}
{template 'web/live/navbar'}
<link rel="stylesheet" type="text/css" href="../addons/kundian_farm/resource/css/style.css" />
<div class="panel panel-success">
    <div class="panel-heading">
        <h3 class="panel-title">
            监控>编辑
        </h3>
    </div>
    <div class="panel-body">
        <form id="sign-form" class="form-horizontal" role="form" method="post" action="{url 'site/entry/live',array('m'=>'kundian_farm','op'=>'live_save','version_id'=>$_GPC['version_id'])}" name="submit" style="padding: 20px 0;">
            <div class="form-group">
                <label class="col-sm-2 control-label">标题</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"  name="title" value="{$list['title']}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">监控分类</label>
                <div class="col-sm-8">
                    <select name="type_id" class="form-control">
                        <option value="0">请选择</option>
                        {loop $typeData $index $item}
                        <option value="{$item['id']}" <?php if($item['id']==$list['type_id']){echo 'selected';}?> >{$item['name']}</option>
                        {/loop}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">莹石云地址</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"  name="src" value="{$list['src']}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">封面(170*125)</label>
                <div class="col-sm-8">
                    {php echo tpl_form_field_image('cover',$list['cover']);}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">是否显示</label>
                <div class="col-sm-8">
                    {if $list['status']==1}
                    <input type="checkbox" checked class="js-switch" value="1" name="status">
                    {else}
                    <input type="checkbox" class="js-switch" name="status" value="1">
                    {/if}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">排序</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control"  name="rank" value="{$list['rank']}">
                </div>
            </div>
            <div class="form-group">

                <div class="col-sm-offset-2 col-sm-10">
                    <input type="hidden" value="{$list['id']}" name="id">
                    <button type="submit" class="btn btn-success">保存</button>
                    <a class="btn btn-default" href="{url 'site/entry/live',array('m'=>'kundian_farm','op'=>'live_list')}">返回</a>
                </div>
            </div>
        </form>
    </div>
</div>
